package com.coders.activities;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

/**
 * This should hold all features shared by CWTT activities.
 * 
 * @author subin
 * 
 */
public class BaseActivity extends Activity
{

    @Override
    protected void onCreate( Bundle savedInstanceState )
    {
        super.onCreate( savedInstanceState );

        // hide titlebar of application
        // must be before setting the layout
      this.requestWindowFeature( Window.FEATURE_NO_TITLE );
        // hide statusbar of Android
        // could also be done later
      this.getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN );
      this.getWindow().setFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
                WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON );
        this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE );

    }
}
